Skip to content

Remove documentation for unavailable tool-search command - #2

Merged
MultiDimensionalDevilsKingdomsRoute666 merged 61 commits into
MultiDimensionalDevilsKingdomsRoute666:mainfrom
github:main
Oct 11, 2026
Merged

MultiDimensionalDevilsKingdomsRoute666 merged 61 commits into
MultiDimensionalDevilsKingdomsRoute666:mainfrom
github:main

Conversation

@MultiDimensionalDevilsKingdomsRoute666

Copy link
Copy Markdown
Owner

Summary

Why

Fixes #

What changed

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

tommaso-moro and others added 30 commits August 26, 2026 16:12
* fix(cli): register tool search command

Wire the documented tool-search subcommand to the existing discovery engine and configured inventory.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* docs: remove unavailable tool-search command

Remove the CLI section that advertised a subcommand the binary does not provide.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f1d58829-0794-4caa-aa18-86543d177609

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f1d58829-0794-4caa-aa18-86543d177609
…y get (#3131)

* fix(repos): give create_or_update_file callers a SHA they can actually get

The create_or_update_file tool description and both of its SHA errors told
the caller to run `git rev-parse <branch>:<path>`. The caller is an MCP
client talking to the GitHub API, and the same description tells it not to
use this tool for local file operations, so it has no working tree to run
that command against.

Point the description at get_file_contents instead, which returns the blob
SHA over the API. In the already-exists error the server has just fetched
the file, so return that SHA directly rather than asking for a round trip.
The stale-SHA error already interpolates the current SHA, so it only needed
the impossible instruction removed.

* fix(repos): stop disclosing the blob SHA when no sha was supplied

The already-exists path is reached only when the caller sent no sha, so
it has not read the file. Returning the current blob SHA there let it
overwrite content it never saw on the next call, which is the race the
SHA gate exists to prevent. Send the caller to get_file_contents for the
path and ref instead, so obtaining the SHA still requires reading the
file.

The stale-SHA path is unaffected: the caller did supply a sha, and that
message already reported the current SHA before this change. Only its
recovery step moved off git rev-parse, and it is now imperative rather
than conditional, since a stale SHA means the file definitely changed.

Assert the already-exists error does not contain the blob SHA so the
gate cannot be loosened again without a test failing.

* fix(repos): make SHA recovery guidance actionable

Map create_or_update_file branch arguments to get_file_contents ref arguments, identify where the requested path SHA is returned, and cover symlink, branch, and API error behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
Co-authored-by: Sam Morrow <info@sam-morrow.com>
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: allow public_repo for contribution tools

* test: tighten public repo scope coverage

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: separate public repo visibility from OAuth scopes

Keep public_repo as a fixed-token visibility capability while requiring repo for per-call OAuth challenges. Challenge only missing scopes for workflow pushes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Paulcake <171492698+paulcakeface@users.noreply.github.com>
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ess hosted connections (#3146)

* fix(http): preserve feature query across OAuth resource metadata

Review on #3146 identified that a query-bearing MCP server URL breaks
OAuth protected-resource metadata discovery: go-sdk v1.7.0 validates
metadata.resource with exact string equality against the full server
URL, but BuildResourceMetadataURL and buildResourceURL dropped the
request's RawQuery, so clients connecting to e.g.

  /mcp/x/issues?features=issue_dependencies

received challenge and metadata URLs without the query and could reject
the metadata as belonging to a different resource (RFC 9728).

- Preserve r.URL.RawQuery in both the advertised resource_metadata URL
  and the metadata document's resource via a shared AppendQuery helper.
- Make feature selection presence-based: the features query parameter
  and the X-MCP-Features header are separate channels that are never
  combined; query wins when both are present.
- Extend TestOAuthChallengeMetadataRouteContracts with a query-bearing
  MCP URL round-trip (challenge URL + metadata.resource exact match).
- Add TestWithRequestConfigFeatureSelection covering all four channel
  combinations, plus unit tests for query preservation in
  TestBuildResourceMetadataURL.

* fix(http): give feature header precedence over query

* fix(http): harden URL feature flag handling

Preserve exact OAuth resource queries across route variants, retain presence-based header precedence, and mark feature-dependent responses with Vary.

Expand request, allowlist, metadata, route, and cache behavior coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Shurong Cao <170531907+CAOShurong@users.noreply.github.com>
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Add head SHA pinning to merge_pull_request

* Update merge_pull_request generated documentation

* test(pull-requests): harden merge SHA pinning

Make the schema and unpinned compatibility coverage explicit, and verify stale-head conflicts surface without a retry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
)

* Fix e2e harness compilation against go-github v89 and go-sdk v1.7

The e2e test package no longer compiled under --tags e2e because it
lagged behind two dependency migrations:

- go-github v89: NewClient now returns (*Client, error) and
  WithEnterpriseURLs moved from a *Client method to a
  ClientOptionsFunc. Update getRESTClient and the inline cleanup
  call sites, and drop the trailing nil options arg from
  ListReviewers.

- go-sdk v1.7: ghmcp.NewMCPServer(MCPServerConfig) was replaced by
  ghmcp.NewStdioMCPServer(ctx, github.MCPServerConfig). Update the
  in-process setupMCPClient branch accordingly, supplying the required
  Logger and Version fields.

* fix(e2e): align client host resolution

Reuse the server API host resolver so GHEC REST and upload clients target the correct subdomains. Add token-free coverage for host URL resolution and the in-process stdio server lifecycle.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: ppoffice <8849362+ppoffice@users.noreply.github.com>
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Return range coordinates for review comments

* docs(pull-requests): describe review comment coordinates

Document nullable current and original range fields and assert their serialized omission behavior for single-line and outdated comments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: yiheng-kkk <272397091+yiheng-kkk@users.noreply.github.com>
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Compare requested labels with the authoritative issue returned by create and update writes, and return a precise partial-failure result when GitHub omits them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix(http): allow projected MCP headers in preflights

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(http): bound projected preflight headers

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix perPage parameter name in actions_list schema

The schema declared per_page while the handler reads pagination through
OptionalPaginationParams, which looks for perPage, so the value was
always dropped and perPage fell back to the default 30.

* fix(projects): spell the page size the way the rest of the server does

projects_list advertised per_page while every other paginated tool
advertises perPage. The handlers read per_page, so it worked, but it left
one tool spelling pagination differently from the other 30 and that is how
actions_list ended up advertising a name nothing read.

The schema now says perPage. per_page is still read when perPage is absent:
the projects tools have advertised it since September 2025 and clients
sending it get the size they ask for today.

TestAllToolInputSchemasUseCanonicalPaginationNames walks the whole tool
inventory and rejects case and underscore variants of page, perPage, after
and before. On main it fails on actions_list and projects_list.
Define the GitHub MCP Server's Server Card (SEP-2127, in review) and a
public no-auth HTTP handler that serves it at the canonical /server-card
backend path. OSS owns all stable identity/metadata and serving behavior;
the remote server only supplies an environment-specific remote URL.

Negotiate Accept and If-None-Match as RFC 9110 list values across repeated
header field-lines. Accept honors quoted commas, media-range parameters, and
q-values (q=0 rejects); entity-tag lists split on quoted commas without
backslash escaping, since an opaque-tag treats a backslash literally. Vary
lists Accept and X-Forwarded-Host and is appended rather than set: it
composes with values added by deployment middleware and, since the response
is publicly cacheable and multi-tenant deployments derive the remote URL from
the trusted X-Forwarded-Host, it keeps a shared cache from serving one
tenant's card to another.

Refs github/copilot-mcp-core#1855, epic github/copilot-mcp-core#1853
Spec: modelcontextprotocol/experimental-ext-server-card

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a9f522f-6942-4b77-98a4-b2d42f19625d
* refactor(features)!: use functional availability rules

Resolve declared inventory features once per request and share the request-owned cache with in-handler feature checks.

BREAKING CHANGE: Inventory items now use FeatureRule instead of FeatureFlagEnable, FeatureFlagEnableAll, and FeatureFlagDisable; FeatureFlagChecker now accepts FeatureFlag.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): address resolver review feedback

Keep legacy string APIs compatible, seed feature state from each inventory's checker, persist caching for stdio calls, and fail closed for empty undeclared flags.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): harden request resolution

Make feature checks reentrant and single-flight, validate rule declarations across short-circuit paths, cache inventory feature metadata, and codify the HTTP context boundary used by the remote server.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* test(features): preserve query flag coverage after rebase

Resolve the feature-query test against the final string-compatible flag API.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): close cycle and ownership gaps

Preserve the public string dependency API, detect concurrent resolution cycles without blocking, and isolate cached feature metadata from caller mutation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): share registration resolution

Seed feature state once for direct registration so tools, resources, and prompts use one consistent snapshot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): isolate metadata and validate variants

Deep-clone JSON metadata at inventory boundaries and exhaustively reject duplicate tool variants that can be enabled together.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(inventory): isolate tool lookup results

Return owned tool metadata from unfiltered lookup APIs so callers cannot mutate cached inventory state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(inventory): normalize owned metadata

Canonicalize JSON metadata at builder boundaries, report invalid values from Build, and preserve wire semantics for typed mutable values.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(inventory): preserve metadata number precision

Decode normalized metadata with UseNumber so large integers and other JSON number forms retain their exact wire representation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* refactor(features): simplify lazy resolution

Preserve string checker APIs, evaluate functional rules lazily through one request memo, remove metadata normalization and eager feature caches, and add remote-sized benchmarks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): fail nested checker resolution closed

Disallow recursive ResolveFeature calls from feature checkers so direct, negating, multi-node, and concurrent cycles cannot cache enabled results or wait on one another.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* docs(features): describe lazy rule resolution

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* perf(features): filter static exclusions first

Skip feature checks for read-only, filtered, unselected, protocol-ineligible, and capability-ineligible tools, and reject declared rules without predicates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): defer unknown client availability

Apply pre-feature protocol and elicitation filtering only when stateless request metadata is known, leaving existing middleware to enforce unknown contexts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

* fix(features): preserve unavailable call errors

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e4a1ca6-53f7-4158-af22-35d2448d0b13
… challenge (#2991)

* feat(governance): add repository ruleset tools with multi-level scope challenge

Reimplements the repository ruleset support from #821 (issue #820) onto the
current inventory-based tool architecture, consolidated into two level-aware
tools in a new non-default `governance` toolset.

- `repository_ruleset_read`: read rulesets, branch rules, and rule suites at
  repository, organization, or enterprise level.
- `create_repository_ruleset`: create a ruleset at any of the three levels.

A `level` argument selects the scope, and a DynamicChallenge up-scopes the
required OAuth scope accordingly (repo -> read:org/admin:org ->
read:enterprise/admin:enterprise), so the default surface only asks for repo
scope. Ruleset creation round-trips the request through go-github's
RepositoryRuleset unmarshalling and rejects rule types, parameters, conditions,
or bypass-actor keys that are silently dropped, preventing typos from creating
a weaker-than-intended ruleset.

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): complete ruleset routing and validation

Add organization rule-suite routing and current filters, harden schema
validation, and keep scope metadata usable for fixed-scope tokens and
library callers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(governance): escape ruleset branch path

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(governance): decode enterprise ruleset lists

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(governance): reject unknown ruleset create fields

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(governance): require explicit ruleset bypass mode

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8
* feat(governance): add custom properties tools with multi-level scope challenge

Add custom properties support to the non-default governance toolset,
completing the second half of the rulesets + custom properties work
requested in #820.

Rather than porting the original six single-level tools verbatim, this
consolidates them into two level-parameterized tools:

- custom_properties_read  (level: repository | organization | enterprise)
- custom_properties_write (level: repository | organization | enterprise)

The `level` argument dispatches to the correct GitHub API. Repository level
reads and writes property VALUES (property_name + value), while organization
and enterprise levels read and write property DEFINITIONS/schema (value_type,
required, allowed_values, default_value, description, values_editable_by).
This distinction is documented in the tool and field descriptions.

Both tools reuse the shared governanceReadScopeAccess/governanceWriteScopeAccess
helpers (renamed from the ruleset-specific names) so rulesets and custom
properties present one consistent, exhaustive scope-challenge policy that
up-scopes based on the requested level.

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): validate custom property values

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): reject unknown custom property fields

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): validate custom properties by level

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): preserve custom property item type

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* fix(governance): preserve partial property updates

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: rerun checks after license regeneration

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8

---------

Co-authored-by: Patrick Knight <patrick-knight@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8
Add an entity-aware plain-text sanitizer for titles, release names, headlines, and validation text while keeping encoded markup inert and Markdown body handling unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the /ui directory: [fast-uri](https://github.com/fastify/fast-uri).


Updates `fast-uri` from 3.1.5 to 3.1.7
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.5...v3.1.7)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dates (#3217)

Bumps the npm_and_yarn group with 2 updates in the /ui directory: [browserslist](https://github.com/browserslist/browserslist) and [qs](https://github.com/ljharb/qs).


Updates `browserslist` from 4.28.2 to 4.28.8
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](browserslist/browserslist@4.28.2...4.28.8)

Updates `qs` from 6.15.2 to 6.16.0
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.15.2...v6.16.0)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: qs
  dependency-version: 6.16.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.37.4 to 4.37.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v4.37.4...v4.37.9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add Agent Plugins 1.0 package

* fix: align Agent Plugin package identity
* fix: preserve Markdown content in GitHub responses

Route body-bearing response fields through the fidelity-preserving content path while retaining strict title handling and remove only unconditional invisible characters. Cover direct and converter read-modify-write surfaces for issues, releases, comments, discussions, projects, and commits.

Refs #2202, #3165

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66

* chore: regenerate license files

Auto-generated by license-check workflow

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copilot-Session: 69c5ab30-9815-4c07-8385-11a206e68f66
Bumps [actions/stale](https://github.com/actions/stale) from 10 to 11.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v10...v11)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '11'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Preserve Markdown and HTML in body and commit-message fields while stripping invisible controls. Apply plain-text sanitization consistently to raw release and sub-issue titles and restore blame headline handling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ot assignment tools (#3221)

assign_copilot_to_issue and assign_copilot_to_issue_with_intent decode owner,
repo and issue_number with mapstructure.WeakDecode, which zero-fills a missing
value instead of erroring. A missing required arg then reached the GraphQL query
and surfaced as a confusing "failed to get suggested actors: Could not resolve
to a Repository" error. Reject the zero values after decoding, matching the
is_suggestion and rationale/confidence checks in the same handlers, so the caller
gets "missing required parameter: <name>". Adds table tests for the missing cases.

Co-authored-by: Justin Willhite <5132924+thejdubb02@users.noreply.github.com>
Bumps golang from 1.27.0-alpine to 1.27.1-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.27.1-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ata (#3251)

* fix(oauth): advertise only default scopes in metadata

Keep the full OAuth scope catalog available for per-tool step-up challenges, but limit protected resource discovery to the lower-risk default grant.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Update expectedScopes in oauth_test.go

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* feat: add update issue comment tool

Add an issues tool for replacing the body of an existing issue or pull request comment, with schema, scope, behavioral, snapshot, and generated documentation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132

* fix: close update comment responses on errors

Register nil-safe response body cleanup before handling go-github errors from issue comment updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132

* fix: clarify issue comment update contract

Reject explicitly empty comment bodies at runtime and distinguish issue and pull request conversation comments from pull request review comments in the tool schema and generated docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132

---------

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132
…nd `remove_pull_request_review_comment_reaction` tools to the granular issues and pull requests toolsets (#3285)
* Identify STDIO API clients across MCP protocols

Preserve release identities, resolve actual source revisions, and attach upstream client metadata per request without mutating shared transports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6dde41da-ec25-4370-b26c-b036d0a53b3c

* Escape MCP client metadata and preserve revision provenance

Encode upstream client comments as valid HTTP header data, keep explicit build revisions independent of embedded dirty state, and reject null source hashes. Cover protocol wire behaviour and document the version-source contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dde41da-ec25-4370-b26c-b036d0a53b3c

* Preserve STDIO startup without usable version metadata

Skip invalid build metadata while retaining release and revision precedence. Fall back to dev with a stderr warning rather than preventing startup, and cover the compatibility contract in tests and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6dde41da-ec25-4370-b26c-b036d0a53b3c

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6dde41da-ec25-4370-b26c-b036d0a53b3c
* Always enable MCP Apps UI; remove remote_mcp_ui_apps flag gate

The remote_mcp_ui_apps flag is fully rolled out on the hosted server, but
the OSS server still defaulted it off. Make MCP Apps unconditional:

- _meta.ui is always emitted, stripped only when the client explicitly
  does not advertise the io.modelcontextprotocol/ui capability
- ui_get is always registered
- write tools defer to MCP App forms by default (still opt-out via
  mcp_apps_disable_form_deferral)
- remove MCPAppsFeatureFlag and its AllowedFeatureFlags/InsidersFeatureFlags
  entries
- update tests and regenerate docs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Remove unused Inventory.checkFeatureFlag

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Omit app-only tools for clients without MCP Apps support

When a client does not advertise io.modelcontextprotocol/ui, stripping
_meta.ui from ui_get turned it into an ordinary model-visible tool,
violating its app-only contract. Now that ui_get is no longer feature
gated, omit tools whose ui.visibility excludes "model" instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI and others added 29 commits October 2, 2026 09:44
…to work when the authenticated actor is a Copilot bot (#3355)
* ci(deps): refresh workflow dependencies and align lint Go version

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* build(deps): refresh safe dependencies and Dependabot coverage

Remediate all nine open npm alerts, update compatible Go and UI dependencies, refresh pinned Actions and the Go image, and backport the Cosign verification fix. Add weekly npm updates and regenerate third-party notices.

Raise the minimum supported Go version to 1.26.8 for the latest x/net dependency and align CI linting with that toolchain.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* ci: preserve Docker tag ordering and remove trailing whitespace

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Resolve new modernization findings and document narrow false-positive suppressions. Verify Go 1.26.8 and 1.27.1 support and remove obsolete export-data compatibility guidance. Refresh cached linter binaries when the repository pin changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Migrate all go-github imports and issue comment requests while preserving MCP schemas and payloads. Let v92 escape ruleset branch names exactly once. Refresh dependency license reports and narrowly retain the supported Ptr helper for compatibility with the pinned linter.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Read the CI Node version from UI engines and match Docker and Node types.\nDocument the native compiler workflow without changing UI dependencies.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(ui): migrate MCP Apps SDK to v2

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: migrate go-github Ptr calls for Go 1.26 lint

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* ci: migrate cosign to v3 with legacy signature compatibility

Keep legacy image payloads, .sig tags, and Rekor v1 service defaults. Document exact cosign v2/v3 image verification and unchanged release archive attestations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* ci: dual-publish legacy and native cosign image signatures

Sign the same immutable digest in separate fail-fast steps. Retain legacy signatures and publish native bundles with v3 service defaults. Remove the verification documentation introduced by this PR as requested; keep compatibility evidence and rollout plans in the PR description.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* build(ui): migrate to React 19 and Primer React 38

Replace removed Box and sx APIs with native styles and CSS Modules, load Primer CSS tokens, use the CSS-based theme provider and Banner, and scope custom-element JSX types to the React runtime.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(ui): use CSS token for reviewer label backgrounds

Replace leftover canvas.inset theme paths with the CSS custom property in PR creation and editing. Keep the reviewed native gaps unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* perf: cache encoded tools/list schemas

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: verify encoded schema cache lifecycle

Document immutable shared schema definitions and verify bounded reuse across HTTP inventories and repeated server registration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Michael Recachinas <mrecachinas@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(inventory): add typed MCP tool registration foundation

Use the MCP SDK's generic registration for concrete input/output types, with protocol-gated output schemas and structured results. Keep raw handlers compatible and apply shared middleware on both paths.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test: cover legacy typed CSV results

Exercise the typed array and object paths through an initialized 2025-11-25 MCP session. Verify CSV text is returned once without structured output or the SDK JSON fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(inventory): normalize legacy typed arguments

Add a raw JSON input normalizer that runs before SDK schema validation so migrated tools can retain legacy input coercions without widening their published schemas. Test case-folded issue states, numeric string IDs, validation failures and replacement registrations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(inventory): preserve typed input optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): stabilize typed schema compatibility

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(inventory): cover protocol isolation across clients

Exercise simultaneous legacy and modern sessions against one typed tool, plus stateless HTTP requests with modern, legacy, and absent protocol headers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): harden typed schema registration contracts

Cache immutable schema variants and enum overrides, preserve runtime input compatibility and request-era output behavior, and normalize dynamic scope challenges before dispatch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): cache warm schemas and guard typed preflight

Avoid repeated canonical schema serialization and header annotation for cache-owned immutable pointers while retaining content-based lookup for caller-owned schemas. Run typed authorization and availability middleware before preflight and preserve tool-result error semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): preserve schema metadata isolation

Advertise the SDK-compatible object schema for typed any input and deep-clone mutable JSON Schema metadata before caching or deriving runtime variants. Add legacy/modern registration and mutation isolation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): detach numeric schema bounds and dedupe default traversal

Two Copilot findings on 431b7a2:

- CloneSchemas only deep-copies subschema nodes, so pointer-valued
  numeric validation keywords (Minimum, Maximum, MinLength, MinItems,
  etc.) remained aliased with the caller-owned schema after
  CloneSchema/CachedSchema. A caller mutating one of those pointers
  after caching could race with concurrent cached-schema
  serialization or silently change the cached validation bounds.
  Clone every *int/*float64 keyword explicitly alongside the existing
  collection/metadata cloning.

- CloneSchemaWithoutDefaults's removeSchemaDefaults visited every
  map/pointer child twice: once via two literal child-collection
  loops, and again via schemaChildren, which already covers the same
  fields. This doubled traversal at every nested level, making
  default removal exponential for deeply nested object/array schemas.
  Traverse only the single comprehensive schemaChildren list.

Add regression coverage across CloneSchema, CachedSchema, schema
inference option cloning, and CloneSchemaWithoutDefaults: every
*int/*float64 keyword is isolated from caller mutation (including
under concurrent marshaling), and a 48-level deep chain is used for
every schema-child field kind to confirm linear, non-exponential
default removal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): gate typed output on supported protocol range

Select modern typed output for SDK-supported ISO-date protocol versions from 2026-07-28 onward. Missing, malformed, and unsupported future versions retain legacy behavior. Cover a later supported version through the selector list seam and verify the public path against the SDK supported set.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): unwrap pointer inputs before schema inference

Match SDK input inference by unwrapping one pointer level before the cached input key and inference. Preserve nullable output pointer schemas. Cover both public constructors with actual modern and legacy discovery and calls, including structured null output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): reuse encoded schema cache for typed tools

Key output encodings by their source definitions while preserving the SDK-registered schema guard. Keep header routing metadata available for legacy and unknown protocol clients.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(context): add typed tool schemas and outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy input acceptance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): preserve input schema roots and optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): validate direct team member calls

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): pin structured output and legacy text fixtures

Describe profile timestamps and validate null and empty team outputs against modern schemas while retaining exact legacy text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): emit structured empty team collections

Keep legacy null text while returning nonnil typed slices so modern clients receive structured content for empty successful results.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy team input schemas

Keep empty identifier rejection in the handler without tightening the published input schema. Pin modern text to structured output and preserve the legacy formatter fixtures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve advertised input schema compatibility

Keep legacy-visible schemas byte-compatible while applying unknown-field acceptance only to the cached runtime validation schema. Verify modern DTO text parity and preserve legacy formatted text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): reject explicit null team user arguments

Preserve the legacy optional user type error before typed decoding, without changing omitted or empty user fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve exact routing argument keys

Ignore case-variant routing aliases before typed decoding while retaining canonical fields and unrelated unknown arguments. Cover direct handlers and legacy/modern registered calls, authenticated fallback, canonical null rejection, and missing identifiers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(comments): add typed visibility tool inputs and outputs

Preserve legacy argument normalization and text responses while exposing protocol-gated structured results for six hide/unhide tools.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* test(comments): pin protocol output parity and reason metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(comments): reuse cached visibility output schema

Clarify supported negotiated protocol versions without expanding runtime support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(search): add typed projected result outputs

* fix(search): preserve field_values presence and add nested schema fixtures

Address review findings on the typed search/list projected-output
tools (search_code, search_issues, search_pull_requests, list_issues,
list_pull_requests, list_branches, list_tags):

- issues.go/pullrequests.go: change FieldValues to a pointer-to-slice
  (*[]MinimalFieldValue) so a successful-but-empty [] is preserved in
  structuredContent, matching legacy text output instead of being
  dropped by omitempty.
- search.go: related adjustments to keep typed search outputs aligned
  with the field_values presence fix.
- typed_search_outputs_test.go: add representative nested/non-empty
  projected item fixtures so schema-conformance tests actually
  exercise item shapes instead of only validating empty collections.
- Add/update toolsnaps for list_branches, list_issues,
  list_pull_requests, list_tags, search_code, search_issues, and
  search_pull_requests to reflect the schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: bound encoded schema parity registration work

Reuse each immutable HTTP server across pagination requests and share the SDK schema cache across parity variants without changing wire comparisons.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(security): add typed alert outputs

Add typed protocol-gated outputs for code quality, code and secret scanning, Dependabot, and security advisories while preserving existing text responses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(security): preserve compatibility with compact typed outputs

Keep advertised input defaults while disabling runtime default injection for security filters. Normalize null CWE filters, compact findings, and verify modern wire outputs alongside exact legacy formatting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat: type discussion and notification tool outputs

Migrate all eleven tools to typed registration and compact output DTOs. Preserve legacy text, parameter compatibility, pagination, and mutation validation while publishing honest modern output unions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: tighten discussion and notification output contracts

Trim notification hypermedia, preserve useful HTML links, and record all modern schemas in canonical snapshots. Preserve source presence during discussion read normalization and cover the Copilot review regression alongside empty/null outputs, IFC labels, sanitization, and output enums.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: cover empty-object discussion read requests and modern-text==DTO expectations

Add an explicit {} (fully-empty args) case to
TestDiscussionReadRequiredArguments proving the normalizer never
synthesizes placeholder owner/repo/discussionNumber values that would
let an empty request satisfy SDK required-schema validation and reach
GraphQL; verified both protocols reject it pre-handler with zero
GraphQL calls (addresses readiness-audit re-flag of already-fixed
Copilot review comment 4171698931 in 578e9929).

Also record the pending modern-text==structuredContent DTO contract
(2026-07-28 protocol) in test expectations; these assertions are
intentionally red pending the coordinator's central once-marshal
wrapper in pkg/inventory/typed_output.go, which this branch does not
yet have.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(notifications): preserve plain status output content

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(repos): add typed commit tool outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): restore commit pagination defaults

Normalize omitted and explicit zero pagination to page 1 and perPage 30 for get_commit and list_commits. Cover legacy and modern wire calls and direct handlers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): return typed projected commit lists

Use an optional-field commit DTO for full and projected modern outputs while retaining exact legacy text. Cover SHA and nested commit projections, empty lists, and output schema conformance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(repos): snapshot modern commit tools and strengthen wire coverage

Capture canonical modern schemas, exercise null lists and error suppression with IFC labels, and drop unrelated generated Linux license drift noted by Copilot review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): distinguish legacy and modern commit text

Keep exact-main byte assertions for the legacy protocol and verify modern text represents the same typed DTO as structured content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): sync commit snapshots with parent DTO metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
)

* feat(issues): add typed metadata comment and dependency outputs

Preserve legacy text and argument coercions while exposing protocol-gated structured issue outputs. Add modern, legacy, unknown-version, union-schema and API-error contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(issues): preserve zero pagination for duplicate search

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(issues): preserve compact typed output contracts

Cache DTO schema inference, retain byte-exact handler text, and cover protocol, pagination and schema contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): bound encoded schema parity registration work

Reuse immutable HTTP comparison servers and the SDK schema cache across the full parity matrix. Refresh inherited user timestamp descriptions in issue snapshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…3395)

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…s and outputs (#3396)

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs

Convert pull_request_read, create_pull_request, update_pull_request,
merge_pull_request, update_pull_request_branch, pull_request_review_write
(both feature variants), add_comment_to_pending_review and
add_reply_to_pull_request_comment to NewTool with concrete inputs and
output DTOs. Input normalizers replay legacy handler checks so legacy
coercions and error text are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): align modern text with typed outputs

Use curated output DTOs for modern JSON text while preserving legacy serialization. Cover successful null responses, empty check runs, and Link-header page traversal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): preserve legacy validation order

Replay parameter checks in handler order and scope cursor validation to review-thread reads. Keep commit message schema descriptions distinct from operation messages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): simplify compatibility validation

Remove normalization and test assertions that only pinned which invalid argument wins. Keep per-field validation, accepted coercions, and response-shape behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(inventory): add typed MCP tool registration foundation

Use the MCP SDK's generic registration for concrete input/output types, with protocol-gated output schemas and structured results. Keep raw handlers compatible and apply shared middleware on both paths.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test: cover legacy typed CSV results

Exercise the typed array and object paths through an initialized 2025-11-25 MCP session. Verify CSV text is returned once without structured output or the SDK JSON fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(inventory): normalize legacy typed arguments

Add a raw JSON input normalizer that runs before SDK schema validation so migrated tools can retain legacy input coercions without widening their published schemas. Test case-folded issue states, numeric string IDs, validation failures and replacement registrations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(inventory): preserve typed input optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): stabilize typed schema compatibility

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(inventory): cover protocol isolation across clients

Exercise simultaneous legacy and modern sessions against one typed tool, plus stateless HTTP requests with modern, legacy, and absent protocol headers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): harden typed schema registration contracts

Cache immutable schema variants and enum overrides, preserve runtime input compatibility and request-era output behavior, and normalize dynamic scope challenges before dispatch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): cache warm schemas and guard typed preflight

Avoid repeated canonical schema serialization and header annotation for cache-owned immutable pointers while retaining content-based lookup for caller-owned schemas. Run typed authorization and availability middleware before preflight and preserve tool-result error semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): preserve schema metadata isolation

Advertise the SDK-compatible object schema for typed any input and deep-clone mutable JSON Schema metadata before caching or deriving runtime variants. Add legacy/modern registration and mutation isolation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): detach numeric schema bounds and dedupe default traversal

Two Copilot findings on 431b7a2:

- CloneSchemas only deep-copies subschema nodes, so pointer-valued
  numeric validation keywords (Minimum, Maximum, MinLength, MinItems,
  etc.) remained aliased with the caller-owned schema after
  CloneSchema/CachedSchema. A caller mutating one of those pointers
  after caching could race with concurrent cached-schema
  serialization or silently change the cached validation bounds.
  Clone every *int/*float64 keyword explicitly alongside the existing
  collection/metadata cloning.

- CloneSchemaWithoutDefaults's removeSchemaDefaults visited every
  map/pointer child twice: once via two literal child-collection
  loops, and again via schemaChildren, which already covers the same
  fields. This doubled traversal at every nested level, making
  default removal exponential for deeply nested object/array schemas.
  Traverse only the single comprehensive schemaChildren list.

Add regression coverage across CloneSchema, CachedSchema, schema
inference option cloning, and CloneSchemaWithoutDefaults: every
*int/*float64 keyword is isolated from caller mutation (including
under concurrent marshaling), and a 48-level deep chain is used for
every schema-child field kind to confirm linear, non-exponential
default removal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): gate typed output on supported protocol range

Select modern typed output for SDK-supported ISO-date protocol versions from 2026-07-28 onward. Missing, malformed, and unsupported future versions retain legacy behavior. Cover a later supported version through the selector list seam and verify the public path against the SDK supported set.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): unwrap pointer inputs before schema inference

Match SDK input inference by unwrapping one pointer level before the cached input key and inference. Preserve nullable output pointer schemas. Cover both public constructors with actual modern and legacy discovery and calls, including structured null output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): reuse encoded schema cache for typed tools

Key output encodings by their source definitions while preserving the SDK-registered schema guard. Keep header routing metadata available for legacy and unknown protocol clients.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(context): add typed tool schemas and outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy input acceptance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): preserve input schema roots and optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): validate direct team member calls

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): pin structured output and legacy text fixtures

Describe profile timestamps and validate null and empty team outputs against modern schemas while retaining exact legacy text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): emit structured empty team collections

Keep legacy null text while returning nonnil typed slices so modern clients receive structured content for empty successful results.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy team input schemas

Keep empty identifier rejection in the handler without tightening the published input schema. Pin modern text to structured output and preserve the legacy formatter fixtures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve advertised input schema compatibility

Keep legacy-visible schemas byte-compatible while applying unknown-field acceptance only to the cached runtime validation schema. Verify modern DTO text parity and preserve legacy formatted text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): reject explicit null team user arguments

Preserve the legacy optional user type error before typed decoding, without changing omitted or empty user fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve exact routing argument keys

Ignore case-variant routing aliases before typed decoding while retaining canonical fields and unrelated unknown arguments. Cover direct handlers and legacy/modern registered calls, authenticated fallback, canonical null rejection, and missing identifiers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(comments): add typed visibility tool inputs and outputs

Preserve legacy argument normalization and text responses while exposing protocol-gated structured results for six hide/unhide tools.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* test(comments): pin protocol output parity and reason metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(comments): reuse cached visibility output schema

Clarify supported negotiated protocol versions without expanding runtime support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(search): add typed projected result outputs

* fix(search): preserve field_values presence and add nested schema fixtures

Address review findings on the typed search/list projected-output
tools (search_code, search_issues, search_pull_requests, list_issues,
list_pull_requests, list_branches, list_tags):

- issues.go/pullrequests.go: change FieldValues to a pointer-to-slice
  (*[]MinimalFieldValue) so a successful-but-empty [] is preserved in
  structuredContent, matching legacy text output instead of being
  dropped by omitempty.
- search.go: related adjustments to keep typed search outputs aligned
  with the field_values presence fix.
- typed_search_outputs_test.go: add representative nested/non-empty
  projected item fixtures so schema-conformance tests actually
  exercise item shapes instead of only validating empty collections.
- Add/update toolsnaps for list_branches, list_issues,
  list_pull_requests, list_tags, search_code, search_issues, and
  search_pull_requests to reflect the schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: bound encoded schema parity registration work

Reuse each immutable HTTP server across pagination requests and share the SDK schema cache across parity variants without changing wire comparisons.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(security): add typed alert outputs

Add typed protocol-gated outputs for code quality, code and secret scanning, Dependabot, and security advisories while preserving existing text responses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(security): preserve compatibility with compact typed outputs

Keep advertised input defaults while disabling runtime default injection for security filters. Normalize null CWE filters, compact findings, and verify modern wire outputs alongside exact legacy formatting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat: type discussion and notification tool outputs

Migrate all eleven tools to typed registration and compact output DTOs. Preserve legacy text, parameter compatibility, pagination, and mutation validation while publishing honest modern output unions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: tighten discussion and notification output contracts

Trim notification hypermedia, preserve useful HTML links, and record all modern schemas in canonical snapshots. Preserve source presence during discussion read normalization and cover the Copilot review regression alongside empty/null outputs, IFC labels, sanitization, and output enums.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: cover empty-object discussion read requests and modern-text==DTO expectations

Add an explicit {} (fully-empty args) case to
TestDiscussionReadRequiredArguments proving the normalizer never
synthesizes placeholder owner/repo/discussionNumber values that would
let an empty request satisfy SDK required-schema validation and reach
GraphQL; verified both protocols reject it pre-handler with zero
GraphQL calls (addresses readiness-audit re-flag of already-fixed
Copilot review comment 4171698931 in 578e9929).

Also record the pending modern-text==structuredContent DTO contract
(2026-07-28 protocol) in test expectations; these assertions are
intentionally red pending the coordinator's central once-marshal
wrapper in pkg/inventory/typed_output.go, which this branch does not
yet have.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(notifications): preserve plain status output content

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): add typed commit tool outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): restore commit pagination defaults

Normalize omitted and explicit zero pagination to page 1 and perPage 30 for get_commit and list_commits. Cover legacy and modern wire calls and direct handlers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): return typed projected commit lists

Use an optional-field commit DTO for full and projected modern outputs while retaining exact legacy text. Cover SHA and nested commit projections, empty lists, and output schema conformance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(repos): snapshot modern commit tools and strengthen wire coverage

Capture canonical modern schemas, exercise null lists and error suppression with IFC labels, and drop unrelated generated Linux license drift noted by Copilot review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): distinguish legacy and modern commit text

Keep exact-main byte assertions for the legacy protocol and verify modern text represents the same typed DTO as structured content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): sync commit snapshots with parent DTO metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed metadata comment and dependency outputs

Preserve legacy text and argument coercions while exposing protocol-gated structured issue outputs. Add modern, legacy, unknown-version, union-schema and API-error contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(issues): preserve zero pagination for duplicate search

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(issues): preserve compact typed output contracts

Cache DTO schema inference, retain byte-exact handler text, and cover protocol, pagination and schema contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): bound encoded schema parity registration work

Reuse immutable HTTP comparison servers and the SDK schema cache across the full parity matrix. Refresh inherited user timestamp descriptions in issue snapshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs

Convert pull_request_read, create_pull_request, update_pull_request,
merge_pull_request, update_pull_request_branch, pull_request_review_write
(both feature variants), add_comment_to_pending_review and
add_reply_to_pull_request_comment to NewTool with concrete inputs and
output DTOs. Input normalizers replay legacy handler checks so legacy
coercions and error text are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): align modern text with typed outputs

Use curated output DTOs for modern JSON text while preserving legacy serialization. Cover successful null responses, empty check runs, and Link-header page traversal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): preserve legacy validation order

Replay parameter checks in handler order and scope cursor validation to review-thread reads. Keep commit message schema descriptions distinct from operation messages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): simplify compatibility validation

Remove normalization and test assertions that only pinned which invalid argument wins. Keep per-field validation, accepted coercions, and response-shape behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): type granular MCP tools

Preserve exact legacy validation and response text while advertising concrete protocol-gated outputs for all granular PR mutations and both thread-resolution variants.

Make the inherited overflow assertion architecture-independent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(pull-requests): preserve granular tool compatibility

Keep advertised schemas exact while applying legacy-compatible runtime validation, and verify protocol-era output parity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(pull-requests): compare schema sets semantically

Treat required properties and enum values as unordered sets in the schema audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): retain granular schema descriptions

Keep the original enum guidance in input descriptions while preserving actual JSON Schema enum constraints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs

Convert pull_request_read, create_pull_request, update_pull_request,
merge_pull_request, update_pull_request_branch, pull_request_review_write
(both feature variants), add_comment_to_pending_review and
add_reply_to_pull_request_comment to NewTool with concrete inputs and
output DTOs. Input normalizers replay legacy handler checks so legacy
coercions and error text are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): align modern text with typed outputs

Use curated output DTOs for modern JSON text while preserving legacy serialization. Cover successful null responses, empty check runs, and Link-header page traversal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): preserve legacy validation order

Replay parameter checks in handler order and scope cursor validation to review-thread reads. Keep commit message schema descriptions distinct from operation messages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): simplify compatibility validation

Remove normalization and test assertions that only pinned which invalid argument wins. Keep per-field validation, accepted coercions, and response-shape behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): type granular MCP tools

Preserve exact legacy validation and response text while advertising concrete protocol-gated outputs for all granular PR mutations and both thread-resolution variants.

Make the inherited overflow assertion architecture-independent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(pull-requests): preserve granular tool compatibility

Keep advertised schemas exact while applying legacy-compatible runtime validation, and verify protocol-era output parity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(pull-requests): compare schema sets semantically

Treat required properties and enum values as unordered sets in the schema audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): retain granular schema descriptions

Keep the original enum guidance in input descriptions while preserving actual JSON Schema enum constraints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(inventory): add typed MCP tool registration foundation

Use the MCP SDK's generic registration for concrete input/output types, with protocol-gated output schemas and structured results. Keep raw handlers compatible and apply shared middleware on both paths.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test: cover legacy typed CSV results

Exercise the typed array and object paths through an initialized 2025-11-25 MCP session. Verify CSV text is returned once without structured output or the SDK JSON fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(inventory): normalize legacy typed arguments

Add a raw JSON input normalizer that runs before SDK schema validation so migrated tools can retain legacy input coercions without widening their published schemas. Test case-folded issue states, numeric string IDs, validation failures and replacement registrations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(inventory): preserve typed input optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): stabilize typed schema compatibility

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(inventory): cover protocol isolation across clients

Exercise simultaneous legacy and modern sessions against one typed tool, plus stateless HTTP requests with modern, legacy, and absent protocol headers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): harden typed schema registration contracts

Cache immutable schema variants and enum overrides, preserve runtime input compatibility and request-era output behavior, and normalize dynamic scope challenges before dispatch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): cache warm schemas and guard typed preflight

Avoid repeated canonical schema serialization and header annotation for cache-owned immutable pointers while retaining content-based lookup for caller-owned schemas. Run typed authorization and availability middleware before preflight and preserve tool-result error semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): preserve schema metadata isolation

Advertise the SDK-compatible object schema for typed any input and deep-clone mutable JSON Schema metadata before caching or deriving runtime variants. Add legacy/modern registration and mutation isolation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): detach numeric schema bounds and dedupe default traversal

Two Copilot findings on 431b7a2:

- CloneSchemas only deep-copies subschema nodes, so pointer-valued
  numeric validation keywords (Minimum, Maximum, MinLength, MinItems,
  etc.) remained aliased with the caller-owned schema after
  CloneSchema/CachedSchema. A caller mutating one of those pointers
  after caching could race with concurrent cached-schema
  serialization or silently change the cached validation bounds.
  Clone every *int/*float64 keyword explicitly alongside the existing
  collection/metadata cloning.

- CloneSchemaWithoutDefaults's removeSchemaDefaults visited every
  map/pointer child twice: once via two literal child-collection
  loops, and again via schemaChildren, which already covers the same
  fields. This doubled traversal at every nested level, making
  default removal exponential for deeply nested object/array schemas.
  Traverse only the single comprehensive schemaChildren list.

Add regression coverage across CloneSchema, CachedSchema, schema
inference option cloning, and CloneSchemaWithoutDefaults: every
*int/*float64 keyword is isolated from caller mutation (including
under concurrent marshaling), and a 48-level deep chain is used for
every schema-child field kind to confirm linear, non-exponential
default removal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): gate typed output on supported protocol range

Select modern typed output for SDK-supported ISO-date protocol versions from 2026-07-28 onward. Missing, malformed, and unsupported future versions retain legacy behavior. Cover a later supported version through the selector list seam and verify the public path against the SDK supported set.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): unwrap pointer inputs before schema inference

Match SDK input inference by unwrapping one pointer level before the cached input key and inference. Preserve nullable output pointer schemas. Cover both public constructors with actual modern and legacy discovery and calls, including structured null output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(inventory): reuse encoded schema cache for typed tools

Key output encodings by their source definitions while preserving the SDK-registered schema guard. Keep header routing metadata available for legacy and unknown protocol clients.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(context): add typed tool schemas and outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy input acceptance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): preserve input schema roots and optionality

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): validate direct team member calls

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(context): pin structured output and legacy text fixtures

Describe profile timestamps and validate null and empty team outputs against modern schemas while retaining exact legacy text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): emit structured empty team collections

Keep legacy null text while returning nonnil typed slices so modern clients receive structured content for empty successful results.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve legacy team input schemas

Keep empty identifier rejection in the handler without tightening the published input schema. Pin modern text to structured output and preserve the legacy formatter fixtures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve advertised input schema compatibility

Keep legacy-visible schemas byte-compatible while applying unknown-field acceptance only to the cached runtime validation schema. Verify modern DTO text parity and preserve legacy formatted text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): reject explicit null team user arguments

Preserve the legacy optional user type error before typed decoding, without changing omitted or empty user fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(context): preserve exact routing argument keys

Ignore case-variant routing aliases before typed decoding while retaining canonical fields and unrelated unknown arguments. Cover direct handlers and legacy/modern registered calls, authenticated fallback, canonical null rejection, and missing identifiers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(comments): add typed visibility tool inputs and outputs

Preserve legacy argument normalization and text responses while exposing protocol-gated structured results for six hide/unhide tools.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* test(comments): pin protocol output parity and reason metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(comments): reuse cached visibility output schema

Clarify supported negotiated protocol versions without expanding runtime support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(search): add typed projected result outputs

* fix(search): preserve field_values presence and add nested schema fixtures

Address review findings on the typed search/list projected-output
tools (search_code, search_issues, search_pull_requests, list_issues,
list_pull_requests, list_branches, list_tags):

- issues.go/pullrequests.go: change FieldValues to a pointer-to-slice
  (*[]MinimalFieldValue) so a successful-but-empty [] is preserved in
  structuredContent, matching legacy text output instead of being
  dropped by omitempty.
- search.go: related adjustments to keep typed search outputs aligned
  with the field_values presence fix.
- typed_search_outputs_test.go: add representative nested/non-empty
  projected item fixtures so schema-conformance tests actually
  exercise item shapes instead of only validating empty collections.
- Add/update toolsnaps for list_branches, list_issues,
  list_pull_requests, list_tags, search_code, search_issues, and
  search_pull_requests to reflect the schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: bound encoded schema parity registration work

Reuse each immutable HTTP server across pagination requests and share the SDK schema cache across parity variants without changing wire comparisons.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(security): add typed alert outputs

Add typed protocol-gated outputs for code quality, code and secret scanning, Dependabot, and security advisories while preserving existing text responses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(security): preserve compatibility with compact typed outputs

Keep advertised input defaults while disabling runtime default injection for security filters. Normalize null CWE filters, compact findings, and verify modern wire outputs alongside exact legacy formatting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat: type discussion and notification tool outputs

Migrate all eleven tools to typed registration and compact output DTOs. Preserve legacy text, parameter compatibility, pagination, and mutation validation while publishing honest modern output unions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: tighten discussion and notification output contracts

Trim notification hypermedia, preserve useful HTML links, and record all modern schemas in canonical snapshots. Preserve source presence during discussion read normalization and cover the Copilot review regression alongside empty/null outputs, IFC labels, sanitization, and output enums.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test: cover empty-object discussion read requests and modern-text==DTO expectations

Add an explicit {} (fully-empty args) case to
TestDiscussionReadRequiredArguments proving the normalizer never
synthesizes placeholder owner/repo/discussionNumber values that would
let an empty request satisfy SDK required-schema validation and reach
GraphQL; verified both protocols reject it pre-handler with zero
GraphQL calls (addresses readiness-audit re-flag of already-fixed
Copilot review comment 4171698931 in 578e9929).

Also record the pending modern-text==structuredContent DTO contract
(2026-07-28 protocol) in test expectations; these assertions are
intentionally red pending the coordinator's central once-marshal
wrapper in pkg/inventory/typed_output.go, which this branch does not
yet have.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(notifications): preserve plain status output content

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): add typed commit tool outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): restore commit pagination defaults

Normalize omitted and explicit zero pagination to page 1 and perPage 30 for get_commit and list_commits. Cover legacy and modern wire calls and direct handlers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(repos): return typed projected commit lists

Use an optional-field commit DTO for full and projected modern outputs while retaining exact legacy text. Cover SHA and nested commit projections, empty lists, and output schema conformance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(repos): snapshot modern commit tools and strengthen wire coverage

Capture canonical modern schemas, exercise null lists and error suppression with IFC labels, and drop unrelated generated Linux license drift noted by Copilot review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): distinguish legacy and modern commit text

Keep exact-main byte assertions for the legacy protocol and verify modern text represents the same typed DTO as structured content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(repos): sync commit snapshots with parent DTO metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed metadata comment and dependency outputs

Preserve legacy text and argument coercions while exposing protocol-gated structured issue outputs. Add modern, legacy, unknown-version, union-schema and API-error contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(issues): preserve zero pagination for duplicate search

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(issues): preserve compact typed output contracts

Cache DTO schema inference, retain byte-exact handler text, and cover protocol, pagination and schema contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): bound encoded schema parity registration work

Reuse immutable HTTP comparison servers and the SDK schema cache across the full parity matrix. Refresh inherited user timestamp descriptions in issue snapshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs

Convert pull_request_read, create_pull_request, update_pull_request,
merge_pull_request, update_pull_request_branch, pull_request_review_write
(both feature variants), add_comment_to_pending_review and
add_reply_to_pull_request_comment to NewTool with concrete inputs and
output DTOs. Input normalizers replay legacy handler checks so legacy
coercions and error text are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): align modern text with typed outputs

Use curated output DTOs for modern JSON text while preserving legacy serialization. Cover successful null responses, empty check runs, and Link-header page traversal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): preserve legacy validation order

Replay parameter checks in handler order and scope cursor validation to review-thread reads. Keep commit message schema descriptions distinct from operation messages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): simplify compatibility validation

Remove normalization and test assertions that only pinned which invalid argument wins. Keep per-field validation, accepted coercions, and response-shape behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): type granular MCP tools

Preserve exact legacy validation and response text while advertising concrete protocol-gated outputs for all granular PR mutations and both thread-resolution variants.

Make the inherited overflow assertion architecture-independent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(pull-requests): preserve granular tool compatibility

Keep advertised schemas exact while applying legacy-compatible runtime validation, and verify protocol-era output parity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(pull-requests): compare schema sets semantically

Treat required properties and enum values as unordered sets in the schema audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): retain granular schema descriptions

Keep the original enum guidance in input descriptions while preserving actual JSON Schema enum constraints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(actions): type consolidated MCP tools

Preserve legacy Actions payloads, validation ordering, coercions, IFC labels, and scope annotations while exposing concrete method-specific output unions to supported clients.

Reject unrecognized versions in the shared structured-output capability gate without changing tool availability rules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(actions): add typed Actions tool outputs

Expose compact method-discriminated outputs for Actions tools while preserving legacy behavior, input coercions, and pagination forwarding.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(repos): complete typed repository tool outputs

Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore(repos): exclude unrelated snapshot formatting drift

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(repos): compact typed repository outputs

Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(issues): add typed consolidated issue tool contracts

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize consolidated typed outputs

Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): keep union property schemas portable

Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): cover strict sub-issue output variants

Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(issues): pin compact comment user redaction

Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore main-identical advertised input schema

Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(issues): restore protocol output parity

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* refactor(issues): minimize granular structured outputs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	pkg/github/__toolsnaps__/add_sub_issue.snap
#	pkg/github/__toolsnaps__/remove_sub_issue.snap
#	pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	pkg/github/granular_issue_types.go
#	pkg/github/issues_granular.go
#	pkg/github/typed_granular_issue_outputs_test.go

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 1973eee
# Last command done (1 command done):
#    pick 5b8f9d19 # refactor(issues): minimize granular structured outputs
# No commands remaining.
# You are currently rebasing.
#
# Changes to be committed:
#	modified:   pkg/github/__toolsnaps__/add_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/add_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/create_issue.snap
#	modified:   pkg/github/__toolsnaps__/hide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_issue_reaction.snap
#	modified:   pkg/github/__toolsnaps__/remove_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/reprioritize_sub_issue.snap
#	modified:   pkg/github/__toolsnaps__/set_issue_fields.snap
#	modified:   pkg/github/__toolsnaps__/unhide_issue_comment.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_assignees.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_body.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_labels.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_milestone.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_state.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_title.snap
#	modified:   pkg/github/__toolsnaps__/update_issue_type.snap
#	modified:   pkg/github/comment_minimize_test.go
#	new file:   pkg/github/granular_issue_types.go
#	modified:   pkg/github/granular_tools_test.go
#	modified:   pkg/github/issues_granular.go
#	new file:   pkg/github/typed_granular_issue_outputs_test.go
#

* refactor(search): use typed account repository and commit tools

Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): compact typed repository search output

Replace the full REST repository mirror with MinimalRepository-based
structured items plus purpose-built full-mode details. Legacy text remains
unchanged, and canonical snapshots now hold the modern output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(search): expose repository visibility enum

Remove the derivable node_id from compact full repository search output and
publish the visibility enum in the static output schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* test(search): align snapshots with protocol wrapper

Keep the modern text assertion aligned with structured content after the shared output wrapper change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs

Convert pull_request_read, create_pull_request, update_pull_request,
merge_pull_request, update_pull_request_branch, pull_request_review_write
(both feature variants), add_comment_to_pending_review and
add_reply_to_pull_request_comment to NewTool with concrete inputs and
output DTOs. Input normalizers replay legacy handler checks so legacy
coercions and error text are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): align modern text with typed outputs

Use curated output DTOs for modern JSON text while preserving legacy serialization. Cover successful null responses, empty check runs, and Link-header page traversal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): preserve legacy validation order

Replay parameter checks in handler order and scope cursor validation to review-thread reads. Keep commit message schema descriptions distinct from operation messages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): simplify compatibility validation

Remove normalization and test assertions that only pinned which invalid argument wins. Keep per-field validation, accepted coercions, and response-shape behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(pull-requests): type granular MCP tools

Preserve exact legacy validation and response text while advertising concrete protocol-gated outputs for all granular PR mutations and both thread-resolution variants.

Make the inherited overflow assertion architecture-independent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* fix(pull-requests): preserve granular tool compatibility

Keep advertised schemas exact while applying legacy-compatible runtime validation, and verify protocol-era output parity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: regenerate license files

Auto-generated by license-check workflow

* test(pull-requests): compare schema sets semantically

Treat required properties and enum values as unordered sets in the schema audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix(pull-requests): retain granular schema descriptions

Keep the original enum guidance in input descriptions while preserving actual JSON Schema enum constraints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* refactor(actions): type consolidated MCP tools

Preserve legacy Actions payloads, validation ordering, coercions, IFC labels, and scope annotations while exposing concrete method-specific output unions to supported clients.

Reject unrecognized versions in the shared structured-output capability gate without changing tool availability rules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* feat(actions): add typed Actions tool outputs

Expose compact method-discriminated outputs for Actions tools while preserving legacy behavior, input coercions, and pagination forwarding.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* preserve typed tool compatibility

* retain typed output fidelity

* tighten typed output contracts
#3440)

The streamable-http job started the server with `go run` and relied on
mcp-server-diff's fixed http_startup_wait_ms sleep. On the baseline
worktree (.mcp-diff-base) nothing is cached, and since the typed tool
refactors compile+link exceeds 5s, so every baseline probe hit
ECONNREFUSED ("fetch failed"). The action treats a one-sided startup
failure as a non-fatal "config-missing" and diffs against an empty
baseline, so fail_on_error never triggered and the job stayed green.

Build the binary in install_command (which completes on both sides
before the server starts) and start it directly, and add a step that
fails the job if any configuration did not start on either side.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Migrate internal imports, build linker symbols, installation docs, and generated license attribution to the /v2 module path.

BREAKING CHANGE: Go consumers must import github.com/github/github-mcp-server/v2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve advertised parameter header bindings in the SDK registration schema so Streamable HTTP rejects header/body mismatches before receiving middleware. Keep full body validation and defaults behind tool guards, with unchanged advertised schemas and OAuth finalization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MultiDimensionalDevilsKingdomsRoute666
MultiDimensionalDevilsKingdomsRoute666 merged commit 006eda6 into MultiDimensionalDevilsKingdomsRoute666:main Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.